﻿using System;
using System.Text;
using System.Linq;
using System.Windows;
using System.ComponentModel;
using System.Windows.Controls;
using System.Collections.Generic;
using System.Collections.ObjectModel;

using Cratos.Tools.General;

namespace Cratos.Generator
{
	/// <summary>
	/// MVP Presenter Interface declaration
	/// </summary>
	public interface IMVPPresenter<T> : INotifyPropertyChanged
	{
		#region Interface Event declarations
		/// <summary>
		/// Progress Start event
		/// </summary>
		event MVPProgressEvent ProgressStart;

		/// <summary>
		/// Progress End event
		/// </summary>
		event MVPProgressEvent ProgressEnd;

		/// <summary>
		/// Progress Update event
		/// </summary>
		event MVPProgressUpdateEvent ProgressUpdate;
		#endregion

		#region Interface Properties
		/// <summary>
		/// View
		/// </summary>
		T View { get; }

		/// <summary>
		/// View Header
		/// </summary>
		string Header { get; }

		/// <summary>
		/// Errors
		/// </summary>
		Collection<CratosError> Errors { get; }

		/// <summary>
		/// Error Message
		/// </summary>
		string ErrorMessage { get; }

		/// <summary>
		/// Transaction Time
		/// </summary>
		long TransactionTime { get; set; }
		#endregion

		#region Interface Methods
		/// <summary>
		/// Display error
		/// </summary>
		/// <param name="viewName">View Name</param>
		void DisplayError(string viewName);

		/// <summary>
		/// Progress Start Method
		/// </summary>
		void OnProgressStart();

		/// <summary>
		/// Progress End method
		/// </summary>
		void OnProgressEnd();

		/// <summary>
		/// Progress Update method
		/// </summary>
		/// <param name="progressMessage"></param>
		void OnProgressUpdate(string progressMessage);
		#endregion
	}
}
